<template>
  <div id="main">
    <Header></Header>
    <transition mode="out-in" appear name="my">
      <keep-alive>
        <router-view></router-view>
      </keep-alive>
    </transition>
    <Footer></Footer>
  </div>
</template>

<script>
import Header from "./components/Header";
import Footer from "./components/Footer";

export default {
  components: {
    Header: Header,
    Footer: Footer,
  },
};
</script>

<style  scoped>
.my-enter-active{
  animation: lightSpeedOut 0.2s reverse
}
.my-leave-active{
  animation: lightSpeedOut 0.5s
}
@keyframes lightSpeedOut {
  0% {
    opacity: 1;
  }

  100% {
    -webkit-transform: translate3d(100%, 0, 0) skewX(30deg);
    transform: translate3d(100%, 0, 0) skewX(30deg);
    opacity: 0;
  }
}
</style>
